//
//  WordNetTest.cpp
//  GRE
//
//  Created by Kutlak Roman on 03/09/2011.
//  Copyright (c) 2011 University of Aberdeen. All rights reserved.
//

#include <iostream>
#include <list>

#include <gtest/gtest.h>

#include "WordNet.h"

using namespace kutlak::roman::gre;

using std::string;
using std::cout;
using std::cerr;
using std::endl;

TEST(WordNet, Instance)
{
    WordNet& wn = WordNet::Instance();
#pragma unused (wn)
}

TEST(WordNet, Synonym)
{
    WordNet& wn = WordNet::Instance();
    
    StringVector_t syns = wn.Synonyms("person");
    StringVector_t sense1;
    
    sense1.push_back("person");
    sense1.push_back("individual");
    sense1.push_back("someone");
    sense1.push_back("somebody");
    sense1.push_back("mortal");
    sense1.push_back("soul");
    
    StringVector_t::const_iterator word, prediction;
    for (word = syns.begin(), prediction = sense1.begin();
         word != syns.end() && prediction != sense1.end();
         ++word, ++prediction)
    {
        EXPECT_EQ(*prediction, *word);
    }
}



